test(v3): constraints suite for eql_v3 encrypted-domain columns#310
Merged
Conversation
Salvaged from local-only wip branch (eql_v3-wip), the genuinely-new, non-superseded subset: - tests: encrypted_domain/constraints.rs — UNIQUE / NOT NULL / FOREIGN KEY coverage on eql_v3 encrypted-domain columns (the v3 analogue of v2's constraint_tests.rs), plus its `mod constraints;` wiring in encrypted_domain.rs. Kept outside `scalars::` so the matrix-inventory snapshot does not mis-read it as a scalar type. - docs: explanatory comment on the load-bearing `::text` cast in eql_v3.compare_ore_cllw_term (NULL-component composites must fall through to the RAISE, not silently return NULL). Comment only — no behaviour change. - changelog: document the already-shipped eql_v2.ore_block_u64_8_256 `=`/`<>` COMMUTATOR fix (#239), which was undocumented.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
sql_string_literal already wraps the value in single quotes and all call
sites interpolate as {lit}::jsonb (no surrounding quotes); the comment's
'{lit}'::jsonb implied double-quoting. Comment only — no behaviour change.
Review note: CHANGELOG #239 attribution for the ore_block COMMUTATOR fix
verified correct (clauses introduced in 601538f, merged via #239).
Every CI job runs mise-action, which installs the mise.toml tools. The bootstrap tool `cargo:cargo-binstall = "latest"` used the cargo: backend, compiling cargo-binstall from source. The latest cargo-binstall now pulls vergen@10.0.0 (MSRV rustc 1.95), but the toolchain bootstrapping mise's cargo backend on the runner is older, so the build fails with exit 101. Because cargo-binstall bootstraps every other cargo tool (sqlx-cli, cargo-nextest, cargo-expand), its failure cascades and `mise install` exits 1 — taking down every workflow before any real work runs. Switch to the registry name `cargo-binstall`, which mise resolves via the aqua backend to a prebuilt binary (aqua:cargo-bins/cargo-binstall). A prebuilt binary has no compiler/MSRV dependency; the downstream cargo: tools are then fetched as prebuilt binaries through it.
… entry The renamed domain is eql_v3.int4_ord_ore (post schema-namespace move), matching the spelling used elsewhere in the same [Unreleased] section.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Salvaged from a local-only WIP branch (
eql_v3-wip), the genuinely-new, non-superseded subset of that work:tests/sqlx/tests/encrypted_domain/constraints.rs(+254) — table-level SQL constraint coverage (UNIQUE/NOT NULL/FOREIGN KEY) oneql_v3encrypted-domain columns, the v3 analogue of v2'sconstraint_tests.rs. Three#[sqlx::test]s seeded from theeql_v2_int4fixture, asserting the constraints bind the raw jsonb payload (byte-identity), not semantic plaintext or theeq_term.mod constraints;inencrypted_domain.rs, kept outsidescalars::so the matrix-inventory snapshot does not mis-read it as a scalar type (same rationale assigned/text_match).src/v3/sem/ore_cllw/functions.sql— explanatory comment on the load-bearing::textcast ineql_v3.compare_ore_cllw_term: a NULL-component composite must fall through to theRAISE(extractor-invariant violation) rather than silently returningNULL. Comment only — no behaviour change.CHANGELOG.md— documents the already-shippedeql_v2.ore_block_u64_8_256=/<>COMMUTATORfix (feat: eql_v2_int4 variant family (v3) #239), which had landed oneql_v3but was missing from the changelog.Why
Fills a real gap on
eql_v3(constraint coverage for the encrypted-domain families) and captures two pieces of already-shipped-but-undocumented context. The rest of the WIP branch was either already oneql_v3(the #303 doubles / cross-ciphertext suite, #306 fixtures), superseded (float design/plan docs — feature shipped via #299), or would have regressedeql_v3if merged wholesale, so it was deliberately left behind.Verification
eql_testscrate root (assert_db_error,fetch_fixture_payload,sql_string_literal); no compile-timequery!macros — runtime-checkedsqlx::queryonly.mise run test:sqlx:prepto generateeql_v2_*.sqlfixtures), so it runs here in CI.